package uebungsblatt09.aufgabe17;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class MeinListener implements ActionListener, ChangeListener, FocusListener, MouseListener
{
  private Oberflaeche frame;
  
  public MeinListener(Oberflaeche frame)
  {
    this.frame = frame;
  }

  public void actionPerformed(ActionEvent e)
  {
    frame.ausgeben("Action performed");
  }

  public void stateChanged(ChangeEvent e)
  {
    frame.ausgeben("State changed");
  }

  public void focusGained(FocusEvent e)
  {
    frame.ausgeben("Focus gained");
  }

  public void focusLost(FocusEvent e)
  {
    frame.ausgeben("Focus lost");
  }

  public void mouseClicked(MouseEvent e)
  {
    frame.ausgeben("Mouse clicked");
  }

  public void mouseEntered(MouseEvent e)
  {
    frame.ausgeben("Mouse entered");
  }

  public void mouseExited(MouseEvent e)
  {
    frame.ausgeben("Mouse exited");
  }

  public void mousePressed(MouseEvent e)
  {
    frame.ausgeben("Mouse pressed");
  }

  public void mouseReleased(MouseEvent e)
  {
    frame.ausgeben("Mouse released");
  }


}
